package cn.bqjr.eily.web.exception;

import cn.bqjr.eily.utils.I18nUtils;
import org.springframework.http.HttpStatus;

/**
 * 异常信息映射
 */
public class ExceptionMapping {

    public static final ExceptionMapping DEFAUT_EXCEPTION = new ExceptionMapping(
            HttpStatus.INTERNAL_SERVER_ERROR, "FFFF", I18nUtils.getMsg("error.sys.default"));

    private HttpStatus httpStatus;
    private String errorCode;
    private String errorMsg;

    public ExceptionMapping(HttpStatus httpStatus, String errorCode, String errorMsg) {
        this.httpStatus = httpStatus;
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
    }

    public HttpStatus getHttpStatus() {
        return httpStatus;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public String getErrorMsg() {
        return errorMsg;
    }
}
